from datetime import datetime, timedelta


def get_week_dates():
    # 获取今天的日期
    today = datetime.now()

    # 找到本周的第一天（周一），如果不是周一，则回退到最近的周一
    # 注意：datetime.weekday() 是从0（周一）到6（周日）
    start_of_week = today - timedelta(days=today.weekday())

    # 获取本周的最后一天（周日）
    end_of_week = start_of_week + timedelta(days=6)

    # 创建一个列表来存储本周每天的日期
    week_dates = []
    current_date = start_of_week
    while current_date <= end_of_week:
        week_dates.append(current_date)
        current_date += timedelta(days=1)

    # 定义一个函数来获取星期的中文名称
    def get_chinese_weekday(date):
        weekdays = ["周一", "周二", "周三", "周四", "周五", "周六", "周日"]
        return weekdays[date.weekday()]

    # 格式化输出本周的日期，包括星期和具体时间（这里以17:00为例）
    formatted_dates = [0]
    for date in week_dates:
        formatted_date = date.strftime("%Y-%m-%d") \
            # + "(" + get_chinese_weekday(date) + "17:00)"
        formatted_dates.append(formatted_date)

    return formatted_dates
